<?php

$current_page = 'home';

include 'inc_header.php';
include 'inc_menu.php';

?>

<div id="main">
	<div class="ym-wrapper">
		<div class="ym-wbox">

			<h2>
				<a href="http://www.baby-million-dollar.com">Willkommen bei der TISE5 Case Study</a>
			</h2>
			<section class="ym-grid linearize-level-1">
				<article class="ym-g75 ym-gl content">
					<?php
					
					// Show Content depending on arguments
					
					$connection = new DAOmySQLi();
					
					 if( isset($_REQUEST["category"]))
                     	{
                        	$category = $_REQUEST["category"];
                            $connection->getProductsOfCategory($category);
                       	}
                   	elseif( isset($_REQUEST["product"]))
                        {
                        	include 'inc_product.php';
                        }
                    elseif( isset($_REQUEST["supplier"]))
                        {
                            $supplier = $_REQUEST["supplier"];
                            $connection->getProductsOfSupplier($supplier);
                        }
                    else
                        {
							$connection->getNews();
                        }
                        
					?>
				</article>
				<?php include 'inc_sidebar.php'?>
			</section>
		</div>
	</div>
</div>


<?php
include 'inc_footer.php';
?>